<?php
	class Slide_model extends CI_Model {
	    
    var $id;	
	var $slide;	
    var $date_created;    

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

    public function getSlide($id = false)
    {
        if($id)
        {
            $query = $this->db->get_where('slide',array('id'=>$id));            
        }
        else
        {
            $query = $this->db->get('slide');
        }

        if($query->num_rows() > 1)
        {
            return $query->result();
        }
        else if($query->num_rows() == 1)
        {
            return $query->row();
        }
        else
        {
            return false;
        }

    }

    public function insert($data)
    {
        return $this->db->insert('slide', $data);
    }

}